package coreservlets;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ThreeParams extends HttpServlet {

	private static final long serialVersionUID = 1L;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		resp.setContentType("text/html");
		PrintWriter out = resp.getWriter();
		String title = "Reading Three Request Parameters";
		out.println(ServletUtilities.headWithTitle(title)
				+ "<BODY BGCOLOR=\"#FDF5E6\">\n" + "<H1 ALIGN=\"CENTER\">"
				+ title + "</H1>\n" + "<UL>\n" + " <LI><B>param1</B>: "
				+ req.getParameter("param1") + "\n" + " <LI><B>param2</B>: "
				+ req.getParameter("param2") + "\n" + " <LI><B>param3</B>: "
				+ req.getParameter("param3") + "\n" + "</UL>\n"
				+ "</BODY></HTML>");
	}

}
